$(document).ready(function () {
    qyglyrz.onload();
})
var qyglyrz = (function () {
    return {
        onload : function () {
            qyglyrz.tableData();
            qyglyrz.alertBox();
            qyglyrz.delAllBtn();
        },
       /*表格数据交互*/
      tableData: function() {
 		var data = [{
 				"number": "001",
 				"landNum": "237638979898009",
 				"gsname": "河南航天金穗电子有限公司",
 				"name":"张三",
 				"idcard": "身份证",
 				"id": "41274898986896767"
 			},
 			{
 				"number": "002",
 				"landNum": "237638979898009",
 				"gsname": "河南航天金穗电子有限公司",
 				"name":"张三",
 				"idcard": "身份证",
 				"id": "41274898986896767"
 			}
 		];
 		$('#wepQyglyrz').DataTable({
 			"data": data,
 			"columnDefs": [
 				{
 					'targets': 0,
 					'className': 'dt-body-center',
 					'render': function(data, type, row) {
 						return '<input class="checkchild" type="checkbox"/>';
 					}
 				}
 			],
 			"columns": [
 			    {
 					"data": "btn"
 				},
 			    {
 					"data": "number"
 				},
 				{
 					"data": "landNum"
 				},
 				{
 					"data": "gsname"
 				},
 				{
 					"data": "name"
 				},
 				{
 					"data": "idcard"
 				},
 				{
 					"data": "id"
 				}
 			],
// 			"paging": false,
 			"info": false,
 			"ordering": false,
 			"lengthChange": false,
 			"searching": false
 		});
      },
        /*点击增加弹出框*/
     alertBox:function(){
     	$('.wep_rz_add').on('click',function(){
     		parent.yhzx_zrr.alertBox(".wep_qyglyrz_addBox",'600px','auto');
     	})
     },
     /*点击删除、取消认证*/
   	  delAllBtn:function(){
   		$('.wep_rz_del').on('click',function(){
   			parent.yhzx_zrr.delAll("确定要删除吗？");
   		});
   		$('.wep_rz_qx').on('click',function(){
   			parent.yhzx_zrr.delAll("确定要取消认证吗？");
   		});
   	  }
    }
})();